<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THisdataEnvtemphumi extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_hisdata_EnvTempHumi', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->bigIncrements('hd_index')->nullable(false)->comment('');
			$table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->datetime('hd_datetime')->nullable(false)->comment('');
			$table->unsignedBigInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->float('hd_envitemp1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp5', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp6', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp7', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp8', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp9', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envitemp10', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi5', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi6', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi7', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi8', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi9', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi10', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_envihumi_num', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp1hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp2hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp3hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp5hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp6hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp7hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp8hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp9hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp10hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp1lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp2lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp3lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp5lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp6lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp7lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp8lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp9lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envitemp10lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi1hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi2hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi3hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi5hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi6hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi7hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi8hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi9hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi10hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi1lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi2lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi3lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi5lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi6lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi7lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi8lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi9lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi10lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi1consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi2consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi3consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi4consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi5consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi6consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi7consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi8consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi9consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_envihumi10consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('hd_index', 'hd_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_hisdata_EnvTempHumi');
    }
}
